/*
 *  Tuan Anh Nguyen.  Email: t.nguyen@latrobe.edu.au
 * Computer Science & Computer Engineering Department
 * La Trobe University, VIC, 3086
 */

/*
 * CommunityMembersManager.java
 *
 * Created on 29/11/2009, 11:14:56 AM
 */

package placecommframework.communitysetup;

import java.io.IOException;
import java.util.logging.*;
/**
 *
 * @author Tuan Nguyen
 */
public class CommunityMembersManager extends javax.swing.JDialog {


    private static Logger theLogger =
             Logger.getLogger(CommunityMembersManager.class.getName());
    private static FileHandler fileTxt;
    private static SimpleFormatter formatterTxt;

    CommunityManager mainForm;
    

    // Constructor
    CommunityMembersManager(CommunityManager mf) {
        this.mainForm = mf;

        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                CommunityMembersManager dialog = new CommunityMembersManager(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
                try{
                    formatterTxt = new SimpleFormatter();
                    fileTxt = new FileHandler("logs/"+CommunityMembersManager.class.getName()+".log");
                    fileTxt.setFormatter(formatterTxt);
                    theLogger.addHandler(fileTxt);
                    //theLogger.log(Level.OFF, String)
                    theLogger.log(Level.INFO, "Log file created");
                }catch (IOException ex){
                    theLogger.log(Level.SEVERE, "Log file create Error");
                }

            }
        });
        

    }

    /** Creates new form CommunityMembersManager */
    public CommunityMembersManager(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        label1 = new java.awt.Label();
        tfNickname = new java.awt.TextField();
        tfFirstname = new java.awt.TextField();
        label2 = new java.awt.Label();
        label3 = new java.awt.Label();
        tfLastname = new java.awt.TextField();
        lstFriendsList = new java.awt.List();
        label4 = new java.awt.Label();
        label5 = new java.awt.Label();
        lstPeopleInCommunity = new java.awt.List();
        label6 = new java.awt.Label();
        tfEmail = new java.awt.TextField();
        label7 = new java.awt.Label();
        tfHomepage = new java.awt.TextField();
        label8 = new java.awt.Label();
        tfPicture = new java.awt.TextField();
        label9 = new java.awt.Label();
        tfOccupation = new java.awt.TextField();
        tfOccupation1 = new java.awt.TextField();
        label10 = new java.awt.Label();
        lstDevicesList = new java.awt.List();
        label11 = new java.awt.Label();
        label12 = new java.awt.Label();
        tfDeviceName = new java.awt.TextField();
        label13 = new java.awt.Label();
        tfBluetoothAddress = new java.awt.TextField();
        label14 = new java.awt.Label();
        tfBarCode = new java.awt.TextField();
        label15 = new java.awt.Label();
        tfRFIDCode = new java.awt.TextField();
        label16 = new java.awt.Label();
        tfMACAddress = new java.awt.TextField();
        label17 = new java.awt.Label();
        tfManufacture = new java.awt.TextField();
        label18 = new java.awt.Label();
        btnDevice = new java.awt.Button();
        btnRemoveDevice = new java.awt.Button();
        chkMobilePhone = new java.awt.Checkbox();
        chkLaptop = new java.awt.Checkbox();
        chkPrinter = new java.awt.Checkbox();
        PDA = new java.awt.Checkbox();
        chkArtifact = new java.awt.Checkbox();
        chkFurniture = new java.awt.Checkbox();
        tfiButtonAddress = new java.awt.TextField();
        label19 = new java.awt.Label();
        btnAddPerson = new java.awt.Button();
        btnAddDevice = new java.awt.Button();
        btnClose = new java.awt.Button();
        btnAddFriends = new java.awt.Button();
        btnRemoveFriends = new java.awt.Button();
        btnClearDeviceDetails = new java.awt.Button();
        btnClearPersonDetails = new java.awt.Button();
        btnAddPersonDevice = new java.awt.Button();
        btnLoadPerson = new java.awt.Button();
        btnLoadDevice = new java.awt.Button();
        lstPersonalDevcies = new java.awt.List();
        label20 = new java.awt.Label();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(placecommframework.PlaceCommFrameworkApp.class).getContext().getResourceMap(CommunityMembersManager.class);
        setTitle(resourceMap.getString("Community Members Manager.title")); // NOI18N
        setName("Community Members Manager"); // NOI18N

        label1.setName("label1"); // NOI18N
        label1.setText(resourceMap.getString("label1.text")); // NOI18N

        tfNickname.setName("tfNickname"); // NOI18N
        tfNickname.setText(resourceMap.getString("tfNickname.text")); // NOI18N

        tfFirstname.setName("tfFirstname"); // NOI18N
        tfFirstname.setText(resourceMap.getString("tfFirstname.text")); // NOI18N

        label2.setName("label2"); // NOI18N
        label2.setText(resourceMap.getString("label2.text")); // NOI18N

        label3.setName("label3"); // NOI18N
        label3.setText(resourceMap.getString("label3.text")); // NOI18N

        tfLastname.setName("tfLastname"); // NOI18N
        tfLastname.setText(resourceMap.getString("tfLastname.text")); // NOI18N

        lstFriendsList.setMultipleMode(true);
        lstFriendsList.setName("lstFriendsList"); // NOI18N

        label4.setName("label4"); // NOI18N
        label4.setText(resourceMap.getString("label4.text")); // NOI18N

        label5.setName("label5"); // NOI18N
        label5.setText(resourceMap.getString("label5.text")); // NOI18N

        lstPeopleInCommunity.setName("lstPeopleInCommunity"); // NOI18N
        lstPeopleInCommunity.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                lstPeopleInCommunityMouseClicked(evt);
            }
        });

        label6.setName("label6"); // NOI18N
        label6.setText(resourceMap.getString("label6.text")); // NOI18N

        tfEmail.setName("tfEmail"); // NOI18N
        tfEmail.setText(resourceMap.getString("tfEmail.text")); // NOI18N

        label7.setName("label7"); // NOI18N
        label7.setText(resourceMap.getString("label7.text")); // NOI18N

        tfHomepage.setName(" "); // NOI18N
        tfHomepage.setText(resourceMap.getString(" .text")); // NOI18N

        label8.setName("label8"); // NOI18N
        label8.setText(resourceMap.getString("label8.text")); // NOI18N

        tfPicture.setName("tfPicture"); // NOI18N
        tfPicture.setText(resourceMap.getString("tfPicture.text")); // NOI18N

        label9.setName("label9"); // NOI18N
        label9.setText(resourceMap.getString("label9.text")); // NOI18N

        tfOccupation.setName("tfOccupation"); // NOI18N
        tfOccupation.setText(resourceMap.getString("tfOccupation.text")); // NOI18N

        tfOccupation1.setName("tfOccupation1"); // NOI18N
        tfOccupation1.setText(resourceMap.getString("tfOccupation1.text")); // NOI18N

        label10.setName("label10"); // NOI18N
        label10.setText(resourceMap.getString("label10.text")); // NOI18N

        lstDevicesList.setName("lstDevicesList"); // NOI18N

        label11.setName("label11"); // NOI18N
        label11.setText(resourceMap.getString("label11.text")); // NOI18N

        label12.setName("label12"); // NOI18N
        label12.setText(resourceMap.getString("label12.text")); // NOI18N

        tfDeviceName.setName("tfDeviceName"); // NOI18N
        tfDeviceName.setText(resourceMap.getString("tfDeviceName.text")); // NOI18N

        label13.setName("label13"); // NOI18N
        label13.setText(resourceMap.getString("label13.text")); // NOI18N

        tfBluetoothAddress.setName("tfBluetoothAddress"); // NOI18N
        tfBluetoothAddress.setText(resourceMap.getString("tfBluetoothAddress.text")); // NOI18N

        label14.setName("label14"); // NOI18N
        label14.setText(resourceMap.getString("label14.text")); // NOI18N

        tfBarCode.setName("tfBarCode"); // NOI18N
        tfBarCode.setText(resourceMap.getString("tfBarCode.text")); // NOI18N

        label15.setName("label15"); // NOI18N
        label15.setText(resourceMap.getString("label15.text")); // NOI18N

        tfRFIDCode.setName("tfRFIDCode"); // NOI18N
        tfRFIDCode.setText(resourceMap.getString("tfRFIDCode.text")); // NOI18N

        label16.setName("label16"); // NOI18N
        label16.setText(resourceMap.getString("label16.text")); // NOI18N

        tfMACAddress.setName("tfMACAddress"); // NOI18N
        tfMACAddress.setText(resourceMap.getString("tfMACAddress.text")); // NOI18N

        label17.setName("label17"); // NOI18N
        label17.setText(resourceMap.getString("label17.text")); // NOI18N

        tfManufacture.setName("tfManufacture"); // NOI18N
        tfManufacture.setText(resourceMap.getString("tfManufacture.text")); // NOI18N

        label18.setName("label18"); // NOI18N
        label18.setText(resourceMap.getString("label18.text")); // NOI18N

        btnDevice.setLabel(resourceMap.getString("btnDevice.label")); // NOI18N
        btnDevice.setName("btnDevice"); // NOI18N
        btnDevice.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDeviceActionPerformed(evt);
            }
        });

        btnRemoveDevice.setActionCommand(resourceMap.getString("btnRemoveDevice.actionCommand")); // NOI18N
        btnRemoveDevice.setLabel(resourceMap.getString("btnRemoveDevice.label")); // NOI18N
        btnRemoveDevice.setName("btnRemoveDevice"); // NOI18N
        btnRemoveDevice.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnRemoveDeviceMouseClicked(evt);
            }
        });

        chkMobilePhone.setLabel(resourceMap.getString("chkMobilePhone.label")); // NOI18N
        chkMobilePhone.setName("chkMobilePhone"); // NOI18N
        chkMobilePhone.setState(true);

        chkLaptop.setLabel(resourceMap.getString("chkLaptop.label")); // NOI18N
        chkLaptop.setName("chkLaptop"); // NOI18N

        chkPrinter.setLabel(resourceMap.getString("chkPrinter.label")); // NOI18N
        chkPrinter.setName("chkPrinter"); // NOI18N

        PDA.setLabel(resourceMap.getString("PDA.label")); // NOI18N
        PDA.setName("PDA"); // NOI18N

        chkArtifact.setLabel(resourceMap.getString("chkArtifact.label")); // NOI18N
        chkArtifact.setName("chkArtifact"); // NOI18N

        chkFurniture.setLabel(resourceMap.getString("chkFurniture.label")); // NOI18N
        chkFurniture.setName("chkFurniture"); // NOI18N

        tfiButtonAddress.setName("tfiButtonAddress"); // NOI18N
        tfiButtonAddress.setText(resourceMap.getString("tfiButtonAddress.text")); // NOI18N

        label19.setName("label19"); // NOI18N
        label19.setText(resourceMap.getString("label19.text")); // NOI18N

        btnAddPerson.setLabel(resourceMap.getString("btnAddPerson.label")); // NOI18N
        btnAddPerson.setName("btnAddPerson"); // NOI18N
        btnAddPerson.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnAddPersonMouseClicked(evt);
            }
        });

        btnAddDevice.setLabel(resourceMap.getString("btnAddDevice.label")); // NOI18N
        btnAddDevice.setName("btnAddDevice"); // NOI18N
        btnAddDevice.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnAddDeviceMouseClicked(evt);
            }
        });

        btnClose.setLabel(resourceMap.getString("btnClose.label")); // NOI18N
        btnClose.setName("btnClose"); // NOI18N
        btnClose.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnCloseMouseClicked(evt);
            }
        });

        btnAddFriends.setLabel(resourceMap.getString("btnAddFriends.label")); // NOI18N
        btnAddFriends.setName("btnAddFriends"); // NOI18N
        btnAddFriends.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnAddFriendsMouseClicked(evt);
            }
        });
        btnAddFriends.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAddFriendsActionPerformed(evt);
            }
        });

        btnRemoveFriends.setActionCommand(resourceMap.getString("btnRemoveFriends.actionCommand")); // NOI18N
        btnRemoveFriends.setLabel(resourceMap.getString("btnRemoveFriends.label")); // NOI18N
        btnRemoveFriends.setName("btnRemoveFriends"); // NOI18N

        btnClearDeviceDetails.setLabel(resourceMap.getString("btnClearDeviceDetails.label")); // NOI18N
        btnClearDeviceDetails.setName("btnClearDeviceDetails"); // NOI18N

        btnClearPersonDetails.setLabel(resourceMap.getString("btnClearPersonDetails.label")); // NOI18N
        btnClearPersonDetails.setName("btnClearPersonDetails"); // NOI18N
        btnClearPersonDetails.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnClearPersonDetailsMouseClicked(evt);
            }
        });

        btnAddPersonDevice.setLabel(resourceMap.getString("btnAddPersonDevice.label")); // NOI18N
        btnAddPersonDevice.setName("btnAddPersonDevice"); // NOI18N

        btnLoadPerson.setActionCommand(resourceMap.getString("btnLoadPerson.actionCommand")); // NOI18N
        btnLoadPerson.setLabel(resourceMap.getString("btnLoadPerson.label")); // NOI18N
        btnLoadPerson.setName("btnLoadPerson"); // NOI18N
        btnLoadPerson.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnLoadPersonMouseClicked(evt);
            }
        });

        btnLoadDevice.setActionCommand(resourceMap.getString("btnLoadDevice.actionCommand")); // NOI18N
        btnLoadDevice.setLabel(resourceMap.getString("btnLoadDevice.label")); // NOI18N
        btnLoadDevice.setName("btnLoadDevice"); // NOI18N

        lstPersonalDevcies.setName("lstPersonalDevcies"); // NOI18N

        label20.setName("label20"); // NOI18N
        label20.setText(resourceMap.getString("label20.text")); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnAddPerson, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnAddDevice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnAddPersonDevice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnClearPersonDetails, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnClearDeviceDetails, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnClose, javax.swing.GroupLayout.DEFAULT_SIZE, 106, Short.MAX_VALUE))
            .addGroup(layout.createSequentialGroup()
                .addGap(41, 41, 41)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(8, 8, 8))
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(label6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(label7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(label8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(label9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(tfPicture, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(tfOccupation, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(tfHomepage, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(tfEmail, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(tfLastname, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(tfFirstname, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(tfNickname, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(label10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(tfOccupation1, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(label19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(10, 10, 10)
                        .addComponent(tfiButtonAddress, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(label16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(label13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(label12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(label15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(label14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(label17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(tfMACAddress, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(tfManufacture, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(tfBarCode, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(tfRFIDCode, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(tfBluetoothAddress, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(tfDeviceName, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(42, 42, 42)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(label4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lstPeopleInCommunity, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(31, 31, 31)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(label5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(lstFriendsList, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(btnRemoveFriends, javax.swing.GroupLayout.DEFAULT_SIZE, 119, Short.MAX_VALUE)
                                    .addComponent(btnAddFriends, javax.swing.GroupLayout.DEFAULT_SIZE, 119, Short.MAX_VALUE)
                                    .addComponent(btnLoadPerson, javax.swing.GroupLayout.DEFAULT_SIZE, 119, Short.MAX_VALUE)
                                    .addComponent(btnRemoveDevice, javax.swing.GroupLayout.Alignment.TRAILING, 0, 0, Short.MAX_VALUE)
                                    .addComponent(btnLoadDevice, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 106, Short.MAX_VALUE)
                                    .addComponent(btnDevice, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))))
                    .addComponent(label18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(chkMobilePhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(chkLaptop, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(PDA, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(chkPrinter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(chkFurniture, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(chkArtifact, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(31, 31, 31)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(lstDevicesList, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(label11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(56, 56, 56))
                            .addComponent(lstPersonalDevcies, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(label20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(tfNickname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(tfFirstname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(tfLastname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(label6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(tfEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(tfHomepage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(label7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(tfPicture, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(label8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(tfOccupation, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(label9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(14, 14, 14)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(tfOccupation1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(label10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(tfDeviceName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(label12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(tfBluetoothAddress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(label13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(tfRFIDCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(label15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(tfBarCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(label14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                .addComponent(label17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(label16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                .addComponent(tfManufacture, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(tfMACAddress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(label19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(tfiButtonAddress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(label4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(lstPeopleInCommunity, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(label5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(btnAddFriends, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(btnRemoveFriends, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(btnLoadPerson, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(lstFriendsList, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(label18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(chkMobilePhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(chkLaptop, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(PDA, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(label11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(btnDevice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(btnRemoveDevice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(btnLoadDevice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(lstPersonalDevcies, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(14, 14, 14)
                                        .addComponent(label20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(chkPrinter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(chkFurniture, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(chkArtifact, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(lstDevicesList, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                .addGap(27, 27, 27)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnAddPerson, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnAddDevice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnAddPersonDevice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnClearPersonDetails, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnClearDeviceDetails, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnClose, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        label2.getAccessibleContext().setAccessibleName(resourceMap.getString("label2.AccessibleContext.accessibleName")); // NOI18N
        btnDevice.getAccessibleContext().setAccessibleName(resourceMap.getString("btnDevice.AccessibleContext.accessibleName")); // NOI18N
        btnAddDevice.getAccessibleContext().setAccessibleName(resourceMap.getString("btnClearPersonDetails1.AccessibleContext.accessibleName")); // NOI18N
        btnLoadPerson.getAccessibleContext().setAccessibleName(resourceMap.getString("btnLoadPerson.AccessibleContext.accessibleName")); // NOI18N

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnDeviceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDeviceActionPerformed
        // TODO add your handling code here:
        theLogger.log(Level.INFO, "Add device clicked ");

        int deviceList[]= this.lstDevicesList.getSelectedIndexes();
        int iSize =deviceList.length;
        for (int j=0; j <iSize; j++ ){
            this.lstPersonalDevcies.add(this.lstDevicesList.getItem(deviceList[j]));
        }


    }//GEN-LAST:event_btnDeviceActionPerformed

    private void btnAddFriendsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAddFriendsActionPerformed
        // TODO add your handling code here:
        theLogger.log(Level.INFO, "Add friend clicked ");
    }//GEN-LAST:event_btnAddFriendsActionPerformed

    private void btnClearPersonDetailsMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnClearPersonDetailsMouseClicked
            // TODO add your handling code here:

            tfBarCode.setText("");
            tfBluetoothAddress.setText("");
            tfDeviceName.setText("");;
            tfEmail.setText("");
            tfFirstname.setText("");;
            tfHomepage.setText("");;
            tfLastname.setText("");;
            tfMACAddress.setText("");;
            tfManufacture.setText("");;
            tfNickname.setText("");;
            tfOccupation.setText("");;
            tfOccupation1.setText("");;
            tfPicture.setText("");;
            tfRFIDCode.setText("");;
            tfiButtonAddress.setText("");;
            
            theLogger.log(Level.INFO, "Cleared form");
            

    }//GEN-LAST:event_btnClearPersonDetailsMouseClicked

    private void btnAddPersonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnAddPersonMouseClicked
        // TODO add your handling code here:
        theLogger.log(Level.INFO, "Person added ");
        this.lstPeopleInCommunity.add(this.tfNickname.getText());
        
    }//GEN-LAST:event_btnAddPersonMouseClicked

    private void btnCloseMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnCloseMouseClicked
        // TODO add your handling code here:
        this.setVisible(false);
    }//GEN-LAST:event_btnCloseMouseClicked

    private void btnAddFriendsMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnAddFriendsMouseClicked
        // TODO add your handling code here:

        int friendlist[]= this.lstPeopleInCommunity.getSelectedIndexes();
        int iSize =friendlist.length;
        for (int j=0; j <iSize; j++ ){
            this.lstFriendsList.add(this.lstPeopleInCommunity.getItem(friendlist[j]));
        }
        
    }//GEN-LAST:event_btnAddFriendsMouseClicked
    private void loadPersonInfo (String nickname){
        this.tfNickname.setText(nickname);
        theLogger.log(Level.INFO, "Person loaded");
        
    }
    private void lstPeopleInCommunityMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lstPeopleInCommunityMouseClicked
        // TODO add your handling code here:
        //this.lstPeopleInCommunity.getSelectedIndex();


    }//GEN-LAST:event_lstPeopleInCommunityMouseClicked

    private void btnLoadPersonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnLoadPersonMouseClicked
        // TODO add your handling code here:
        this.theLogger.log(Level.INFO,"Load person button clicked");
        
        loadPersonInfo(this.lstPeopleInCommunity.getSelectedItem());

    }//GEN-LAST:event_btnLoadPersonMouseClicked

    private void btnAddDeviceMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnAddDeviceMouseClicked
        // TODO add your handling code here:
        this.lstDevicesList.add(this.tfDeviceName.getText());
        theLogger.log(Level.INFO, "Device Added");
    }//GEN-LAST:event_btnAddDeviceMouseClicked

    private void btnRemoveDeviceMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnRemoveDeviceMouseClicked
        // TODO add your handling code here:
        this.lstPersonalDevcies.remove(this.lstPersonalDevcies.getSelectedIndex());

    }//GEN-LAST:event_btnRemoveDeviceMouseClicked

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                CommunityMembersManager dialog = new CommunityMembersManager(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private java.awt.Checkbox PDA;
    private java.awt.Button btnAddDevice;
    private java.awt.Button btnAddFriends;
    private java.awt.Button btnAddPerson;
    private java.awt.Button btnAddPersonDevice;
    private java.awt.Button btnClearDeviceDetails;
    private java.awt.Button btnClearPersonDetails;
    private java.awt.Button btnClose;
    private java.awt.Button btnDevice;
    private java.awt.Button btnLoadDevice;
    private java.awt.Button btnLoadPerson;
    private java.awt.Button btnRemoveDevice;
    private java.awt.Button btnRemoveFriends;
    private java.awt.Checkbox chkArtifact;
    private java.awt.Checkbox chkFurniture;
    private java.awt.Checkbox chkLaptop;
    private java.awt.Checkbox chkMobilePhone;
    private java.awt.Checkbox chkPrinter;
    private java.awt.Label label1;
    private java.awt.Label label10;
    private java.awt.Label label11;
    private java.awt.Label label12;
    private java.awt.Label label13;
    private java.awt.Label label14;
    private java.awt.Label label15;
    private java.awt.Label label16;
    private java.awt.Label label17;
    private java.awt.Label label18;
    private java.awt.Label label19;
    private java.awt.Label label2;
    private java.awt.Label label20;
    private java.awt.Label label3;
    private java.awt.Label label4;
    private java.awt.Label label5;
    private java.awt.Label label6;
    private java.awt.Label label7;
    private java.awt.Label label8;
    private java.awt.Label label9;
    private java.awt.List lstDevicesList;
    private java.awt.List lstFriendsList;
    private java.awt.List lstPeopleInCommunity;
    private java.awt.List lstPersonalDevcies;
    private java.awt.TextField tfBarCode;
    private java.awt.TextField tfBluetoothAddress;
    private java.awt.TextField tfDeviceName;
    private java.awt.TextField tfEmail;
    private java.awt.TextField tfFirstname;
    private java.awt.TextField tfHomepage;
    private java.awt.TextField tfLastname;
    private java.awt.TextField tfMACAddress;
    private java.awt.TextField tfManufacture;
    private java.awt.TextField tfNickname;
    private java.awt.TextField tfOccupation;
    private java.awt.TextField tfOccupation1;
    private java.awt.TextField tfPicture;
    private java.awt.TextField tfRFIDCode;
    private java.awt.TextField tfiButtonAddress;
    // End of variables declaration//GEN-END:variables

}
